package f.admin.service;

import java.util.List;

import net.sf.json.JSONArray;
import f.admin.entity.QueryParam;

public interface IService<T> {

	public void add(T t) throws Exception;
	public void update(T t) throws Exception;
	public T getById(String id);
	public boolean delete(String id);
	public List<T> listAll();
	public List<T> getByQueryParams(List<QueryParam> queryParams);
	public List<T> getByQueryParam(QueryParam queryParam);
	public List<T> listByPage(int page, int pageSize, QueryParam... queryParams);
	public JSONArray listToJsonArray(List<T> tList);
	public int getCount();
}
